package cn.hiapi.user.vo;

import cn.hiapi.basic.entity.BasicEntity;
import cn.hiapi.shop.vo.ShopBase;
import cn.hiapi.shopkeeper.enums.ActivityType;
import cn.hiapi.shopkeeper.enums.OrderStatus;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * @author AdinZ
 * @date 2023/1/1 10:26
 */
@Setter
@Getter
public class ActivityOrderVo extends BasicEntity {
    @ApiModelProperty("订单id")
    private Long id;
    @ApiModelProperty("店铺资料")
    private ShopBase shop;
    @ApiModelProperty("活动id")
    private long aid;
    private Object user;
    @ApiModelProperty("订单状态")
    private OrderStatus status;
    @ApiModelProperty("活动标题")
    private String title;
    @ApiModelProperty("活动封面")
    private String thumb;
    @ApiModelProperty("活动类型")
    private ActivityType activityType;
    @ApiModelProperty("实际付款金额,totalMoney-discount-sugar")
    private BigDecimal payment = BigDecimal.ZERO;
    @ApiModelProperty("喜糖抵扣数量")
    private BigDecimal sugar = BigDecimal.ZERO;
    @ApiModelProperty("优惠金额")
    private BigDecimal discount = BigDecimal.ZERO;
    @ApiModelProperty("商品原价格")
    private BigDecimal costPrice = BigDecimal.ZERO;
    @ApiModelProperty("单价")
    private BigDecimal price = BigDecimal.ZERO;
    @ApiModelProperty("购买数量")
    private int number = 1;
    @ApiModelProperty("应付总额 price * number")
    private BigDecimal totalMoney = BigDecimal.ZERO;

    @ApiModelProperty("兑换开始时间")
    private long useStart;

    @ApiModelProperty("兑换结束时间")
    private long useEnd;
    @ApiModelProperty("创建时间")
    private long created;

    @ApiModelProperty("支付时间")
    private Long payTime;

    @ApiModelProperty("团购到期时间")
    private long expire;
    private Object expand;

    @ApiModelProperty("团购信息")
    private ActivityOrderGroupVo group;

    @ApiModelProperty("买家订单备注")
    private String buyerRemark;

    @ApiModelProperty("转移方向 0 没转增, 1转出,2转入")
    private int giftDirection;

    private List codes = new ArrayList();
}
